package com.bigshen.demo.annotation.configurecomponents.a3Lazy;

import com.bigshen.demo.project.entity.Person;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class MyTest {

    @Test
    public void test() {

        ApplicationContext applicationContext = new AnnotationConfigApplicationContext(MyConfig.class);
        System.out.println("IOC容器初始化完成");

        Person person = (Person) applicationContext.getBean("person222");

        System.out.println(person);

    }

}
